package cn.study.vue_project_xxx.service.impl;

import cn.study.vue_project_xxx.entity.po.Menu;
import cn.study.vue_project_xxx.manager.MenuManager;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.study.vue_project_xxx.mapper.MenuMapper;
import cn.study.vue_project_xxx.service.MenuService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * (Menu)表服务实现类
 *
 * @author makejava
 * @since 2023-04-26 16:38:31
 */
@Service("menuService")
public class MenuServiceImpl extends ServiceImpl<MenuMapper, Menu> implements MenuService {

    @Resource
    MenuManager menuManager;


    @Override
    public List<Menu> getFirstLevelDirectory() {
        //查询出所有的一级类目
        return menuManager.selectFirstLevelDirectory();
    }

    @Override
    public List<Menu> getChildDirectory(Menu menu) {
        //查询出所有该级的子级类目
        return menuManager.selectChildDirectory(menu);
    }
}

